package com.one.common.common.system.model.param;

import com.amap.api.location.AMapLocation;

import java.io.Serializable;

/**
 * Author: zhulunjun
 * Email: zhulunjun@qq.com
 * CreateDate: 2019/6/10 19:28
 * Description：
 **/
public class GpsInfoBean implements Serializable {
    private String gps_city_code;
    private String gps_longitude;
    private String gps_latitude;
    private String gps_detail;

    public GpsInfoBean(AMapLocation aMapLocation) {
        String address1 = aMapLocation.getProvince();//定位一级地址
        String address2 = aMapLocation.getCity();//定位二级地址
        String address3 = aMapLocation.getDistrict();//定位三级地址
        double longitude = aMapLocation.getLongitude();//经度
        double latitude = aMapLocation.getLatitude();//纬度
        String detail = aMapLocation.getAddress();//定为详细地址
        String city_id = aMapLocation.getAdCode();//城市ID

        setGps_city_code(city_id);
        setGps_longitude(longitude + "");
        setGps_latitude(latitude + "");
        setGps_detail(detail + "");

    }

    public String getGps_city_code() {
        return gps_city_code;
    }

    public void setGps_city_code(String gps_city_code) {
        this.gps_city_code = gps_city_code;
    }

    public String getGps_longitude() {
        return gps_longitude;
    }

    public void setGps_longitude(String gps_longitude) {
        this.gps_longitude = gps_longitude;
    }

    public String getGps_latitude() {
        return gps_latitude;
    }

    public void setGps_latitude(String gps_latitude) {
        this.gps_latitude = gps_latitude;
    }

    public String getGps_detail() {
        return gps_detail;
    }

    public void setGps_detail(String gps_detail) {
        this.gps_detail = gps_detail;
    }
}
